﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VictorBlaga.DocumentManagement.Core.Models.Repositories;
using VictorBlaga.DocumentManagement.Core.Models;

namespace VictorBlaga.DocumentManagement.Tests.Stubs
{
    public class FakeWorkshopRepository : IWorkshopRepository
    {
        private readonly Workshop[] _fakeWorkshops = {
                                                         new Workshop{
                                                                         ID = 1,
                                                                         Name = "Workshop no. 1"
                                                                     },
                                                         new Workshop{
                                                                         ID = 2,
                                                                         Name = "Workshop no. 2"
                                                                     },
                                                         new Workshop{
                                                                         ID = 3,
                                                                         Name = "Workshop no. 3"
                                                                     },
                                                     };
        public Workshop GetByID(int id)
        {
            var workshop = _fakeWorkshops.FirstOrDefault(w => w.ID == id);
            return workshop;
        }

        public void Save(Workshop item)
        {
            throw new NotImplementedException();
        }

        public void Delete(Workshop item)
        {
            throw new NotImplementedException();
        }

        public bool IsUniqueName(int id, string name)
        {
            throw new NotImplementedException();
        }

        public Workshop New()
        {
            return new Workshop();
        }

        public Workshop[] GetAll()
        {
            return _fakeWorkshops;
        }
    }
}